<!DOCTYPE html>
<html>
  <head>
  <meta charset='UTF-8'>
  <title>Atom API Documentation</title>
  <link rel='stylesheet' href='../assets/biscotto.css' type='text/css'>
  <script src='../assets/biscotto.js'></script>
  <script src='../assets/search_data.js'></script>
</head>
  <body>
    <div id='base' data-path='..&#47;'></div>
<div id='header'>
  <div id='menu'>
    <a href='../docs/README.md.html' title='Atom'>Atom</a>
    &raquo;
    <a href='../class_index.html' title='Index'>Index</a>
    &raquo;
    <span class='title'>Keymap</span>
    <nav>
      <ul>
        <li class='noframes'>
          (<a class='noframes' href='Keymap.html#'>no frames</a>)
        </li>
      </ul>
    </nav>
    <div id='search'>
      <a id='class_list_link' href='../class_list.html'>Classes</a>
      <a id='file_list_link' href='../file_list.html'>Files</a>
      <a id='method_list_link' href='../method_list.html'>Methods</a>
      <a id='extra_list_link' href='../extra_list.html'>Extras</a>
    </div>
  </div>
  <iframe id='search_frame'></iframe>
  <div id='fuzzySearch'>
    <input type='text'>
    <ol></ol>
  </div>
  <div id='help'>
    <p>
      Quickly fuzzy find classes, mixins, methods, file:
    </p>
    <ul>
      <li>
        <span>Ctrl-T</span>
        Open fuzzy finder dialog
      </li>
    </ul>
    <p>
      In frame mode you can toggle the list naviation frame on the left side:
    </p>
    <ul>
      <li>
        <span>Ctrl-L</span>
        Toggle list view
      </li>
    </ul>
    <p>
      You can focus a list in frame mode or toggle a tab in frameless mode:
    </p>
    <ul>
      <li>
        <span>Ctrl-C</span>
        Class list
      </li>
      <li>
        <span>Ctrl-I</span>
        Mixin list
      </li>
      <li>
        <span>Ctrl-F</span>
        File list
      </li>
      <li>
        <span>Ctrl-M</span>
        Method list
      </li>
      <li>
        <span>Ctrl-E</span>
        Extras list
      </li>
    </ul>
    <p>
      You can focus and blur the search input:
    </p>
    <ul>
      <li>
        <span>Ctrl-S</span>
        Focus search input
      </li>
      <li>
        <span>Esc</span>
        Blur search input
      </li>
    </ul>
    <p>
      In frameless mode you can close the list tab:
    </p>
    <ul>
      <li>
        <span>Esc</span>
        Close list tab
      </li>
    </ul>
  </div>
</div>
    <div id='content'>
      <h1>
        Class
        Keymap
      </h1>
      <div class='stability-1'>
        <span class='heading'></span>
        <div class='message'></div>
      </div>
      <table class='box'>
        <tr>
          <td>Defined in:</td>
          <td>src&#47;keymap.coffee</td>
        </tr>
      </table>
      <h2>Overview</h2>
      <div class='docstring'>
  <p>Associates keybindings with commands.</p><p>An instance of this class is always available as the <code>atom.keymap</code> global.</p><p>Keymaps are defined in a CSON/JSON format. A typical keymap looks something
like this:</p><pre><code class="lang-cson">&#39;body&#39;:
  &#39;ctrl-l&#39;: &#39;package:do-something&#39;
&#39;.someClass&#39;:
  &#39;enter&#39;: &#39;package:confirm&#39;
</code></pre><p>As a key, you define the DOM element you want to work on, using CSS notation.
For that key, you define one or more key:value pairs, associating keystrokes
with a command to execute. </p>
</div>
<div class='tags'>
</div>
      <h2>Instance Method Summary</h2>
      <ul class='summary'>
  <li>
    <span class='signature'>
      <a href='Keymap.html#getKeyBindings-instance'>
        ::<strong>getKeyBindings</strong>()
      </a>
    </span>
    <span class='desc'>
      Returns an array of all <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Keymap.html#keyBindingsForCommand-instance'>
        ::<strong>keyBindingsForCommand</strong>(command)
      </a>
    </span>
    <span class='desc'>
      Returns an array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s that match a command
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Keymap.html#keyBindingsForCommandMatchingElement-instance'>
        ::<strong>keyBindingsForCommandMatchingElement</strong>(command, element)
      </a>
    </span>
    <span class='desc'>
      Returns a array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s (sorted by selector specificity) that match a command.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Keymap.html#keyBindingsForKeystroke-instance'>
        ::<strong>keyBindingsForKeystroke</strong>(keystroke)
      </a>
    </span>
    <span class='desc'>
      Returns an array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s that match a keystroke keystroke: The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> representing the keys pressed (e.g.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Keymap.html#keyBindingsForKeystrokeMatchingElement-instance'>
        ::<strong>keyBindingsForKeystrokeMatchingElement</strong>(keystroke, element)
      </a>
    </span>
    <span class='desc'>
      Returns a array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s (sorted by selector specificity) that match a keystroke and element.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Keymap.html#keyBindingsMatchingElement-instance'>
        ::<strong>keyBindingsMatchingElement</strong>(element, keyBindings = @keyBindings)
      </a>
    </span>
    <span class='desc'>
      Returns a array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s (sorted by selector specificity) whos selector matches the element.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Keymap.html#keystrokeStringForEvent-instance'>
        ::<strong>keystrokeStringForEvent</strong>(event, previousKeystroke)
      </a>
    </span>
    <span class='desc'>
      Returns a keystroke string derived from an event.
    </span>
  </li>
</ul>
      <h2>Instance Method Details</h2>
      <div class='methods'>
  <div class='method_details'>
    <p class='signature' id='getKeyBindings-instance'>
      ::<strong>getKeyBindings</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns an array of all <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='keyBindingsForCommand-instance'>
      ::<strong>keyBindingsForCommand</strong>(command)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns an array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s that match a command</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keystroke</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> representing the keys pressed (e.g. ctrl-P)</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='keyBindingsForCommandMatchingElement-instance'>
      ::<strong>keyBindingsForCommandMatchingElement</strong>(command, element)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns a array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s (sorted by selector specificity) that match a command.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>command</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> representing the command (tree-view:toggle).</span>
    </li>
    <li>
      <span class='type'>(KeyBinding)</span>
      <span class='name'>element</span>
      &mdash;
      <span class='desc'>The DOM node that will match a <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>&#39;s selector.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='keyBindingsForKeystroke-instance'>
      ::<strong>keyBindingsForKeystroke</strong>(keystroke)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns an array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s that match a keystroke</p><p>keystroke: The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> representing the keys pressed (e.g. ctrl-P) </p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='keyBindingsForKeystrokeMatchingElement-instance'>
      ::<strong>keyBindingsForKeystrokeMatchingElement</strong>(keystroke, element)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns a array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s (sorted by selector specificity) that match a keystroke and element.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keystroke</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> representing the keys pressed (e.g. ctrl-P).</span>
    </li>
    <li>
      <span class='type'>(KeyBinding)</span>
      <span class='name'>element</span>
      &mdash;
      <span class='desc'>The DOM node that will match a <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>&#39;s selector.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='keyBindingsMatchingElement-instance'>
      ::<strong>keyBindingsMatchingElement</strong>(element, keyBindings = @keyBindings)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns a array of <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>s (sorted by selector specificity) whos selector matches the element.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(KeyBinding)</span>
      <span class='name'>element</span>
      &mdash;
      <span class='desc'>The DOM node that will match a <a href='https://atom.io/docs/api/v0.67.0/api/classes/KeyBinding.html'>KeyBinding</a>&#39;s selector.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='keystrokeStringForEvent-instance'>
      ::<strong>keystrokeStringForEvent</strong>(event, previousKeystroke)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns a keystroke string derived from an event.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='name'>event</span>
      &mdash;
      <span class='desc'>A DOM or jQuery event.</span>
    </li>
    <li>
      <span class='name'>previousKeystroke</span>
      &mdash;
      <span class='desc'>An optional string used for multiKeystrokes.</span>
    </li>
  </ul>
</div>
  </div>
</div>
    </div>
    <div id='footer'>
  Generated on
  Wed Mar 05 2014 08:55:13 GMT-0700 (MST)
  by
  <a href='https://github.com/gjtorikian/biscotto' title='TomDoc-CoffeeScript API documentation generator'>Biscotto</a>
  v2.1.1
  (Node.js v0.10.22).
  &#10034;
  Press Ctrl-h to see the keyboard shortcuts
</div>
  </body>
</html>